<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
<title>JwsCms内容管理系统</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/Public/Static/css/bootstrap.min.css" />
<link rel="stylesheet" href="/Public/Static/css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="/Public/Admin/css/matrix-style.css" />
<link rel="stylesheet" href="/Public/Admin/css/matrix-media.css" />
<link href="/Public/Admin/css/font-awesome/css/font-awesome.css" rel="stylesheet" />
<script src="/Public/Static/js/jquery-1.7.2.min.js"></script> 
<!--link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'-->
</head>
<body>
<!--Header-part-->
<div id="header">
  <h1><a href="dashboard.html">MatAdmin</a></h1>
</div>
<!--close-Header-part-->
<!--top-Header-menu-->
<div id="user-nav" class="navbar navbar-inverse">
  <ul class="nav" style="font-size:12px;">
    <li  class="dropdown" id="profile-messages" ><a title="" href="#" data-toggle="dropdown" data-target="#profile-messages" class="dropdown-toggle"><i class="icon icon-user"></i>  <span class="text"><?php echo ($_SESSION['username']); ?></span><b class="caret"></b></a>
      <ul class="dropdown-menu">
        <li><a href="#"><i class="icon-user"></i> 我的资料</a></li>
        <li class="divider"></li>
        <li><a href="<?php echo U('Admin/Public/Logout');?>"><i class="icon-key"></i> 退出</a></li>
      </ul>
    </li>
    <li class=""><a title="" href="#"><i class="icon icon-cog"></i> <span class="text">前台页面</span></a></li>
    <li class=""><a title="" href="#"><i class="icon icon-cog"></i> <span class="text">设置</span></a></li>
    <li class=""><a title="" href="login.html"><i class="icon icon-share-alt"></i> <span class="text">退出</span></a></li>
  </ul>
</div>
<!--close-top-Header-menu-->
<!--start-top-serch-->
<div id="search">
  前台页面
</div>
<!--close-top-serch-->
<!--sidebar-menu-->
<div id="sidebar"><a href="#" class="visible-phone"><i class="icon icon-home"></i> 控制台</a>
  <ul>
    <li> <a href="<?php echo U('Admin/Along/Index');?>"><i class="icon icon-th-list"></i> <span>单页管理</span> </a></li>
    <li> <a href="#"><i class="icon icon-th-list"></i> <span>新闻列表</span> </a></li>
    <li> <a href="#"><i class="icon icon-th-list"></i> <span>产品管理</span> </a></li>
    <li> <a href="#"><i class="icon icon-th-list"></i> <span>案例管理</span> </a></li>
    <li class="submenu"> <a href="#"><i class="icon icon-th-list"></i> <span>用户管理</span> </a>
      <ul>
        <li><a href="<?php echo U('Admin/Auth/Index');?>">角色管理</a></li>
        <li><a href="<?php echo U('Admin/User/Index');?>">用户管理</a></li>
      </ul>
    </li>
    <li class="submenu"> <a href="#"><i class="icon icon-th-list"></i> <span>系统管理</span> </a>
      <ul>
        <li><a href="<?php echo U('Admin/Node/Index');?>">菜单配置</a></li>
        <li><a href="<?php echo U('Admin/Config/Index');?>">配置管理</a></li>
        <li><a href="<?php echo U('Admin/Model/Index');?>">模型管理</a></li>
      </ul>
    </li>
  </ul>
</div>
<!--sidebar-menu-->


<div id="content">
  <div id="content-header">
    <div id="breadcrumb"><a class="tip-bottom" href="#" data-original-title="Go to Home"><i class="icon-home"></i> 首页</a> <a class="current" href="#"><?php echo ($meta_title); ?></a></div>
  </div>
  <div class="container-fluid">
    <!--conter-->
    
<style type="text/css">.file_sort{width:30px; height:10px!important; line-height:10px!important; margin:0px!important;}</style>
<div class="widget-box">
          <div class="widget-title"> <span class="icon"> <i class="icon-th"></i> </span>
            <h5><?php echo ($meta_title); ?></h5>
             <div class="buttons">
              <a class="btn"  href="<?php echo U('AddField',array('modelId'=>I('modelId'),'isChannel'=>I('isChannel')));?>">新增模型</a>          
             </div>
           </div>
          <div class="widget-content ">
          <form action="<?php echo U('Sort');?>" method="post">
            <table class="table table-bordered table-striped with-check">
                  <thead>
                    <tr>
                      <td>排序</td>
                      <td>字段名</td>
                      <td>别名</td>
                      <td>字段类型</td>
                      <td>主表</td>
                      <td>状态</td>
                      <td>操作</td>
                    </tr>
                  </thead>
              <tbody>
                 <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo['status'] == 1): ?><tr>
                      <td><input type="text" name="sort[<?php echo ($vo["field_id"]); ?>]" value="<?php echo ($vo["sort"]); ?>" class="file_sort" /></td>
                      <td><?php echo ($vo["field"]); ?></td>
                      <td><?php echo ($vo["name"]); ?></td>
                      <td>
                        <?php if($vo['type'] == editor): ?>编辑器 
                          <elseif condition="$vo['type'] eq channel_id">栏目
                          <?php else: echo get_attribute_type($vo['type']); endif; ?>
                      </td>
                      <td><?php if($vo['issystem'] == 1): ?><font color="blue">√</font><?php else: ?> <font color="red">╳</font><?php endif; ?></td>
                      <td><span class="badge badge-success">开启<span></td>
                      <td>
                      <a href="<?php echo U('editField',array('id'=>$vo['field_id'],'modelId'=>$vo['model_id'],'isChannel'=>$vo['is_channel']));?>">编辑</a>  |
                      <?php if($vo['issystem'] == 1): ?><font color="#ddd">禁用</font><?php else: ?><a href="<?php echo U('Status',array('fieldid'=>$vo['field_id'],'status'=>$vo['status'],issystem=>$vo['issystem']));?>">禁用</a><?php endif; ?>
                      <?php if($vo['issystem'] == 2): ?><a href="<?php echo U('delField',array('id'=>$vo['field_id']));?>">删除</a><?php endif; ?>
                      </td>
                    </tr><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                   <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo['status'] == 0): ?><tr>
                      <td><input type="text" name="sort[<?php echo ($vo["field_id"]); ?>]" value="<?php echo ($vo["sort"]); ?>" class="file_sort"  /></td>
                      <td><?php echo ($vo["field"]); ?></td>
                      <td><?php echo ($vo["name"]); ?></td>
                      <td>
                        <?php if($vo['type'] == editor): ?>编辑器 
                          <elseif condition="$vo['type'] eq channel_id">栏目
                          <?php else: echo get_attribute_type($vo['type']); endif; ?>
                      </td>
                      <td><?php if($vo['issystem'] == 1): ?><font color="blue">√</font><?php else: ?> <font color="red">╳</font><?php endif; ?></td>
                      <td><span class="badge">关闭<span></td>
                      <td><a href="<?php echo U('editField',array('id'=>$vo['field_id']));?>">编辑</a> | <a href="<?php echo U('Status',array('fieldid'=>$vo['field_id'],'status'=>$vo['status'],issystem=>$vo['issystem']));?>">启用</a></td>
                      <?php if($vo['issystem'] == 2): ?><a href="<?php echo U('delField',array('id'=>$vo['field_id']));?>">删除</a><?php endif; ?>
                    </tr><?php endif; endforeach; endif; else: echo "" ;endif; ?>
              </tbody>
            </table>
            <div class="form-actions">
              <button class="btn btn-success" type="submit">排序</button>
            </div>
            </form>
          </div>
        </div>

    <!--conter-->
  </div>
</div>


<script src="/Public/Static/js/bootstrap.min.js"></script> 
<script src="/Public/Admin/js/jquery.ui.custom.js"></script> 
<script src="/Public/Admin/js/matrix.js"></script>
</body>
</html>